package Mangos::DB::Mangos::MailLootTemplate;

use strict;

use base qw(Mangos::DB::Mangos);

__PACKAGE__->meta->setup
(
    table   => 'mail_loot_template',

    columns => 
    [
        entry               => { type => 'integer', not_null => 1 },
        item                => { type => 'integer', not_null => 1 },
        ChanceOrQuestChance => { type => 'float', default => 100, not_null => 1, precision => 32 },
        groupid             => { type => 'integer', default => '0', not_null => 1 },
        mincountOrRef       => { type => 'integer', default => 1, not_null => 1 },
        maxcount            => { type => 'integer', default => 1, not_null => 1 },
        lootcondition       => { type => 'integer', default => '0', not_null => 1 },
        condition_value1    => { type => 'integer', default => '0', not_null => 1 },
        condition_value2    => { type => 'integer', default => '0', not_null => 1 },
    ],

    primary_key_columns => [ 'entry', 'item' ],
);

1;

package Mangos::DB::Mangos::MailLootTemplate::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Mangos::MailLootTemplate' }

__PACKAGE__->make_manager_methods('mail_loot_template');

1;
